package cn.wolfcode.car.domain;

import cn.wolfcode.car.utils.JsonUtil;
import com.alibaba.fastjson.JSON;
import lombok.*;
import result.JsonResult;

import java.util.HashMap;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Department {
    private Long id;

    private String name;

    private String sn;

    private Long tel;

    private String functionary;

    private Long staff;

    private Long aurhorized;


    public Object getJson() {
        return JsonUtil.objToJson(this, Department.class);
//        HashMap<String, Object> map = new HashMap<>();
//        map.put("id", this.id);
//        map.put("name", this.name);
//        map.put("sn", this.sn);
//        //JsonResult success = JsonResult.success(map);
//        return JSON.toJSONString(map);
    }

}